package com.ponhu.ea2.dto;

import com.ponhu.ea2.support.validation.annotions.ValidateEnumValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Accessors(chain = true)
@ApiModel(value = "货品配件或附件-数据传输模型 ")
public class PhInventoryAccessoryDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotEmpty(message = "字典类型不能为空")
    @ValidateEnumValue(strValues = {"INVENTORY_ANNEX", "INVENTORY_ACCESSORY"}, message = "字典类型必须为：附件-INVENTORY_ANNEX，配件-INVENTORY_ACCESSORY")
    @ApiModelProperty(value = "字典类型：附件-INVENTORY_ANNEX，配件-INVENTORY_ACCESSORY", required = true)
    private String dictType;

    @NotNull(message = "字典项值不能为空")
    @ApiModelProperty(value = "字典项值", required = true)
    private Integer dictItemValue;

    @NotEmpty(message = "字典项名称不能为空")
    @ApiModelProperty(value = "字典项名称", required = true)
    private String dictItemLabel;

}
